package cn.kgc.Adjudicative.controller;


import cn.kgc.Adjudicative.common.Result;
import cn.kgc.Adjudicative.entity.DMenu;
import cn.kgc.Adjudicative.service.DMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zrz
 * @since 2023-01-05
 */
@RestController
@RequestMapping("/d-menu")
public class DMenuController {
    @Resource
    private DMenuService dMenuService;

    @GetMapping("/list")
    public Result list(@RequestParam String roleId){
        List list = dMenuService.lambdaQuery().like(DMenu::getMenurole,roleId).list();
        return Result.success(list);
    }
}
